<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="classfun.asp"-->
<%
call chkAdmin("|11")
call getsort%>
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3c.org/tr/1999/rec-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>频道修改</title>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" id="css" href="images/style.css">
<link rel="stylesheet" href="../ZKeditor/themes/default/default.css" />
<link rel="stylesheet" href="../ZKeditor/plugins/code/prettify.css" />
<script type="text/javascript" src="../ZKeditor/kindeditor.js"></script>
<script type="text/javascript" src="../ZKeditor/plugins/code/prettify.js"></script>
<script type="text/javascript" src="js/pinyin.js"></script>
<script>
KindEditor.ready(function(K) {
    var editor = K.create('textarea[name="content"]', {
        cssPath : '../ZKeditor/plugins/code/prettify.css',
        uploadJson : '../ZKeditor/asp/upload_json.asp',
        fileManagerJson : '../ZKeditor/asp/file_manager_json.asp',
        allowFileManager : true,
        afterCreate : function() {
            var self = this;
            K.ctrl(document, 13, function() {
                self.sync();
                K('form[name=add]')[0].submit();
            });
            K.ctrl(self.edit.doc, 13, function() {
                self.sync();
                K('form[name=add]')[0].submit();
            });
	K('#insertHtml').click(function(e) {
		editor.insertHtml('[==华==丽==的==分==页==码==]');
	});
        },
		afterBlur: function(){this.sync();}
    });
    prettyPrint();
	K('#flash').click(function() {
		editor.loadPlugin('filemanager', function() {
			editor.plugin.filemanagerDialog({
				viewType : 'VIEW',
				dirName : 'image',
				urlType : 'relative',
				clickFn : function(url, title) {
					K('#sortimg').val(url);
					editor.hideDialog();
				}
			});
		});
	});
});
</script>
</head>
<body>
<form name="form" action="?action=edit" method="post" >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
    <td height="30" class="topnav"><div>修改分类</div></td>
  </tr>
  <tr>
    <td bgcolor="#ffffff">
    <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" class="stable" >
        <tr>						
    <td align=right width=100 height=25 class="td">栏目名称</td>
    <td class="td"><input name="sortname" class="inp" id="sortname" style="width: 200px" onBlur="Sorthtml.value=($('#sortname').toPinyin());" onChange="Sorthtml.value=($('#sortname').toPinyin())" onKeydown="Sorthtml.value=($('#sortname').toPinyin())" value="<%=sortname%>" maxlength="200"/> <font color=#ff0000>*</font> </td>
  </tr>
  <tr id="hid6">
    <td align=right width=100 height=25 class="td">栏目英文</td>    
    <td class="td"><input name="Sorthtml" class="inp" id="Sorthtml" style="width:200px" value="<%=Sorthtml%>" maxlength="200"/><span class="badge">*顶级栏目时作为静态目录</span></td>
</tr>
  <tr>
    <td align=right width=100 height=25 class="td">顶级分类</td>    
    <td class="td"><%loadselect "parentid","zych_type","sortname","sortid",parentid, 0,"order by px_id","顶级栏目",sortid,"onChange=""sethtml(ParentID.value)"""%></td>
</tr>
  <tr>
    <td class="td" align=right width=100 height=25>类属模型</td>    
    <td class="td"><%=makesorttyperadio("sortType",SortType,getsorttype(getForm("id","get"))," on")%></td>
</tr>
  <tr>
    <td class="td" align=right width=100 height=25>外部链接</td>
    <td class="td"><input name="sorturl" class="inp" style="width: 300px" value="<%=sorturl%>"  maxlength="200"/> 注：留言链接"/message/" </td>
    </tr>
   <tr>
    <td class="td" align=right width=100 height=25>频道图片</td>
    <td class="td"><table width="200" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><input class="inp" style="width:300px" name="sortimg" type="text" id="sortimg" size="40"value="<%=sortimg%>"/></td>
    <td><input name="flash" type="button" class="button" id="flash" value="选取已上传" /></td>
    <td><iframe src="up.asp?formname=form&inputname=sortimg&uploadstyle=nav" frameborder="0" scrolling="no" width="250" height="28"></iframe></td>
  </tr>
</table></td>
    </tr>
  <tr>
    <tr>
    <td class="td" align=right height=25>顶部导航</td>
    <td class="td"><label class="inp"><input class="checkbox" type="checkbox" <% if menu=1 then echo"checked=""checked"""%>  name="menu" value="1"/> 显示到顶部导航</label></td>
  </tr>
    <tr>
    <td class="td" align=right width=100 height=25>分页/排序</td>
    <td class="td"><input class="inp" maxlength="6" value="<%=page%>" style="width: 60px" name="page"/> /<input class="inp" maxlength="6"  style="width:60px" name="px_id" value="<%=px_id%>"/>单页设置可忽略此项</td></tr>
    
    <tr>
    <td class="td" align=right width=100 height=25>频道模型</td>
    <td class="td"><select class="sel" onChange="Temp.value=this.value">
	<option value="">选择或填写</option>
	 <%
       Set FSO=Server.CreateObject("Scripting.FileSystemObject")
       Set ServerFolder=FSO.GetFolder(Server.MapPath(zych_templatedir))
       Set ServerFolderList=ServerFolder.Files
       For Each ServerFileEvery IN ServerFolderList
	   filename=ServerFileEvery.Name
	   if instr(filename,"c_")>0 then
	   tbody=ReadFromTextFile(zych_templatedir&filename&"","utf-8")
	   if instr(tbody,"<!--##")>0 then filetitle=split(tbody,"##")(1) else filetitle=filename
	   if Temp=filename then  sel=" selected" else sel=""
	   %>
	<option<%=sel%> value="<%=filename%>"><% =filetitle%></option>
    <% end if
	 Next %>
	</select><input type="text" id="Temp" class="inp" name="Temp" value="<%=Temp%>"/></td>
    </tr>
    <tr>
    <td class="td" align=right width=100 height=25>内容模型</td>
    <td class="td"><select class="sel" onChange="sTemp.value=this.value">
	<option value="">选择或填写</option>
	 <%
       Set FSO=Server.CreateObject("Scripting.FileSystemObject")
       Set ServerFolder=FSO.GetFolder(Server.MapPath(zych_templatedir))
       Set ServerFolderList=ServerFolder.Files
       For Each ServerFileEvery IN ServerFolderList
	   filename=ServerFileEvery.Name
	   if instr(ServerFileEvery.Name,"d_")>0 then
	   tbody=ReadFromTextFile(zych_templatedir&filename&"","utf-8")
	   if instr(tbody,"<!--##")>0 then filetitle=split(tbody,"##")(1) else filetitle=filename
	   if Temp=filename then  sel=" selected" else sel=""%>
	<option<%=sel%> value="<%=filename%>"><% =filetitle%></option>
    <% end if
	 Next %>
	</select><input type="text" id="sTemp" class="inp" name="sTemp" value="<%=sTemp%>"/></td>
    </tr>
  <tr>
  <tr>
    <td class="td" align=right height=25>启用状态</td>
    <td class="td"><label class="inp"><input class="checkbox" type="checkbox" <% if isok=1 then echo"checked=""checked"""%> name="isok" value="1"/> 是否开通</label>
    </td>
  </tr>
  <tr>
    <td class="td" align=right height=25>页面标题</td>
    <td class="td"> <input class="inp" maxlength="200" style="width: 450px"  name="pagetitle" value="<%=pagetitle%>"/>  
    </td>
  </tr>
  <tr>
    <td class="td" align=right height=25>关键词</td>
    <td class="td"> <input class="inp" maxlength="200" style="width: 450px"  name="pagekeywords" value="<%=pagekeywords%>"/>  
    </td>
  </tr>
  <tr>
    <td class="td" align=right height=25>页面描述</td>
    <td class="td"><textarea class="tex" style="width: 450px" name="pagedesc" rows="3"><%=pagedesc%></textarea>
    </td>
  </tr>

  <tr id="hid5">
    <td class="td" align="right" height="30">详情内容<br>
       <a href="javascript:void(0)" id="insertHtml"> 插入分页</a></a>
        <input type="hidden" name="page_code" id="page_code" value="{yfcms:page}"/></td>
    <td class="td"><textarea  name="content" id="content" rows="3"  style="width:750px; height:300px"><%=replace(""&content&"","'","&#39;")%></textarea></td>
  </tr>
    <tr>
        <td height="25" align="right" class="td">&nbsp;</td><input type="hidden" name="sortid" value="<%=sortid%>" />
        <td class="td"><input class="btn" type="submit" value="更 新" />&nbsp;&nbsp;
<input class="btn" type="button" value=" 返 回 " onClick="history.go(-1)"/> &nbsp;&nbsp;

 </td>
      </tr>
    </table>
	</td>
  </tr>
</table></form>
<%call footer%>
</body></html>